package com.ktjiaoyu.crm.service;

import com.ktjiaoyu.crm.entity.Chance;
import com.ktjiaoyu.crm.entity.Right;
import com.ktjiaoyu.crm.entity.Role;
import com.ktjiaoyu.crm.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 *
 * @author Administrator
 */
public interface IRoleService {
    public List<Role>  findAllRoles();
    /**
     * 分页查询
     * @param roleName 用户姓名
     * @param pageable 分页条件
     * @return 集合
     */
    public Page<Role> findRoles(String roleName, Pageable pageable);
    public Role saveRole(Role role);//进行新增或修改
    public void  delRole(Long roleId);
    public Role getRole(Long roleId);
    public Role getRoleByUser(User user);
    public List<Right> findAllRights();
    public List<Right> findRightsByRole(Role role);
}
